﻿<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>API文档首页</title>
    <div th:replace="include/_meta :: head"></div>

</head>
<body>

<header th:replace="include/_header :: header"></header>
<div th:replace="include/_menu :: menu"></div>

<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a>
</div>

<section class="Hui-article-box">
    <div class="Hui-article">
        <h3 th:if="${hasData eq 0}" style="text-align: center;color:red">暂无数据，请发布 API 数据</h3>
        <article class="cl pd-20" id="content">
            <div class="panel panel-default">
                <div class="panel-header">XXX 接口基本信息</div>
                <div class="panel-body">
                    <div>
                        <label>请求方式：</label><span>GET</span>
                    </div>
                    <div>
                        <label>请求地址：</label><span>http://localhost:8080/api</span>
                    </div>
                </div>
            </div>

            <h3>Request</h3>
            <pre class="prettyprint">
    fileName  文件名
    page_no  查询第几页
    page_size 每页查询多少条记录
    id:      空间ID
    type     空间类型，群体空间：   class：班级空间  school : 学校空间  subject : 学科空间   area : 区域空间
            </pre>

            <h3>Response</h3>
            <textarea class="textarea" style="overflow: hidden" autoHeight="true" disabled="disabled">
{
  "lastPage": false,
  "pageSize": 2,
  "pageNumber": 1,
  "firstPage": true,
  "list": [
    {
      "id": "4ff653823a0849e4a32f41e278045b10",
      "file_size": 18,
      "res_id": "63b050b41ced43ca8b62fef7f64c1b0b",
      "create_time": "2016-09-26 13:15:54",
      "download_num": 1,
      "file_name": "a",
      "creator": "1",
      "file_type": "txt"
    },
    {
      "id": "93308742f8f84019984de81174be7861",
      "file_size": 234,
      "res_id": "f69f40c85cb94a5a8a08bf4d6ba26891",
      "create_time": "2016-09-26 13:24:53",
      "download_num": 0,
      "file_name": "a",
      "creator": "1",
      "file_type": "png"
    }
  ],
  "totalRow": 3,
  "totalPage": 2
}
            </textarea>

            <h3>接口其它说明</h3>
            <pre class="prettyprint">
                这里是接口其它相关说明
            </pre>

        </article>
        <footer class="footer">
            <p>
                感谢jQuery、layer、laypage、Validform、UEditor、My97DatePicker、iconfont、Datatables、WebUploaded、icheck、highcharts、bootstrap-Switch<br/>
                Copyright &copy;2015 H-ui.admin v3.0 All Rights Reserved.<br/> 本后台系统由<a href="http://www.h-ui.net/"
                                                                                        target="_blank"
                                                                                        title="H-ui前端框架">H-ui前端框架</a>提供前端技术支持
            </p>
        </footer>
    </div>
</section>

<div th:replace="include/_footer :: footer"></div>

<script type="text/javascript" th:inline="javascript">
    var ctx = [[@{/}]];ctx = ctx.substr(0, ctx.length - 1);<!--获取项目根路径-->
    var id = [[${id}]];
    $(function () {

    });

    function toExport(){
        window.location=ctx+'/export?id='+id;
    }

    $.fn.autoHeight = function(){
        function autoHeight(elem){
            elem.style.height = 'auto';
            elem.scrollTop = 0; //防抖动
            elem.style.height = elem.scrollHeight + 'px';
        }
        this.each(function(){
            autoHeight(this);
            $(this).on('keyup', function(){
                autoHeight(this);
            });
        });
    }
    $('textarea[autoHeight]').autoHeight();
</script>
</body>
</html>